home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 5 / DINKDEMO / DINKCLAS / DOBJECT.C < prev    next >
Text File  |  1992-07-08  |  1KB  |  80 lines

  1. /*
  2.     File:        DObject.c
  3.  
  4.     Written by:    Mark Gross
  5.  
  6.     Copyright:    ⌐ 1992 by Applied Technical Software, all rights reserved.
  7.     Use at your own risk.
  8.  
  9. */
  10.  
  11. #include "DObject.h"
  12. #include <pascal.h>
  13. #include <stdio.h>
  14.  
  15. void    DObject::ErrorAlert(short stringsID, short theError)
  16. {
  17.     short    result;
  18.     Str255    theStr;
  19.     Str255    nullStr;
  20.     
  21.     *nullStr = 0;
  22.     
  23.     GetIndString(theStr, stringsID, theError);
  24.     
  25.     ParamText(theStr, nullStr, nullStr, nullStr);
  26.     result = CautionAlert(rErrorAlert, NULL);
  27.  
  28. }// end of function ErrorAlert
  29.  
  30.  
  31.  
  32. void    DObject::Beep(int times)
  33. {
  34.     while ( times--)
  35.         SysBeep(20);
  36. }
  37.  
  38. void     DObject::EnterMB(void)
  39. {
  40.     Debugger( );
  41. }
  42.  
  43.  
  44. void    DObject::EnterMBStr(char *theString)
  45. {
  46.     
  47.     DebugStr( CtoPstr(theString) );
  48.  
  49. }
  50.  
  51. void DObject::MakeMBAlias(char* alias, void* address)
  52. {
  53.     char buffer[80];
  54.     
  55.     sprintf(buffer, ";MC %s %lx", alias, address);
  56.     EnterMBStr(buffer);
  57. }        
  58.     
  59.  
  60. pascal void DObject::SetZero(void)
  61. {
  62.     *(long *)(NULL) = 0x50FFC001;
  63. }
  64.  
  65.  
  66. void __noObject(void)
  67. {
  68.         SysBeep(20);
  69.         DebugStr("\p noObject catch, from oopsDebug stubs!!!");
  70. }
  71.  
  72. void __noMethod(void)
  73. {
  74.         SysBeep(20);
  75.         SysBeep(20);
  76.         DebugStr("\p noMethod catch, from oopsDebug stubs");
  77. }
  78.  
  79.  
  80.